<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>CANopenNode: NMT and Heartbeat</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(function() { init_search(); });
/* @license-end */
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">CANopenNode
   </div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('group__CO__NMT__Heartbeat.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#files">Files</a> &#124;
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">NMT and Heartbeat<div class="ingroups"><a class="el" href="group__CO__CANopen__301.html">CANopen_301</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
Files</h2></td></tr>
<tr class="memitem:CO__NMT__Heartbeat_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="CO__NMT__Heartbeat_8h.html">CO_NMT_Heartbeat.h</a></td></tr>
<tr class="memdesc:CO__NMT__Heartbeat_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">CANopen Network management and Heartbeat producer protocol. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structCO__NMT__t.html">CO_NMT_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">NMT consumer and Heartbeat producer object, initialized by <a class="el" href="group__CO__NMT__Heartbeat.html#ga3d1e633487f14741ce32c80ed8be1312" title="Initialize NMT and Heartbeat producer object.">CO_NMT_init()</a>  <a href="structCO__NMT__t.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga1e8c2a6c0fd4a33183503d25a7c6d744"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__NMT__Heartbeat.html#ga1e8c2a6c0fd4a33183503d25a7c6d744">CO_NMT_internalState_t</a> { <br />
&#160;&#160;<a class="el" href="group__CO__NMT__Heartbeat.html#gga1e8c2a6c0fd4a33183503d25a7c6d744a52d111d4262b514df4433ae07969cc3c">CO_NMT_UNKNOWN</a> = -1, 
<a class="el" href="group__CO__NMT__Heartbeat.html#gga1e8c2a6c0fd4a33183503d25a7c6d744a672c48c0e9bd5cb070bd86e1dcdc085c">CO_NMT_INITIALIZING</a> = 0, 
<a class="el" href="group__CO__NMT__Heartbeat.html#gga1e8c2a6c0fd4a33183503d25a7c6d744ae41d4ebcb7e26e165c8685b5809871a9">CO_NMT_PRE_OPERATIONAL</a> = 127, 
<a class="el" href="group__CO__NMT__Heartbeat.html#gga1e8c2a6c0fd4a33183503d25a7c6d744a3f9d07a10f2781201b85e9de9ba1c9a5">CO_NMT_OPERATIONAL</a> = 5, 
<br />
&#160;&#160;<a class="el" href="group__CO__NMT__Heartbeat.html#gga1e8c2a6c0fd4a33183503d25a7c6d744aba34c0b4b2c6a0c11b01236cbe949ed5">CO_NMT_STOPPED</a> = 4
<br />
 }</td></tr>
<tr class="memdesc:ga1e8c2a6c0fd4a33183503d25a7c6d744"><td class="mdescLeft">&#160;</td><td class="mdescRight">Internal network state of the CANopen node.  <a href="group__CO__NMT__Heartbeat.html#ga1e8c2a6c0fd4a33183503d25a7c6d744">More...</a><br /></td></tr>
<tr class="separator:ga1e8c2a6c0fd4a33183503d25a7c6d744"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac396242e2e12ef6b0b22ff48636bc4eb"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__NMT__Heartbeat.html#gac396242e2e12ef6b0b22ff48636bc4eb">CO_NMT_command_t</a> { <br />
&#160;&#160;<a class="el" href="group__CO__NMT__Heartbeat.html#ggac396242e2e12ef6b0b22ff48636bc4eba6c7cdae79e5939cf321cdf82aa6b4146">CO_NMT_ENTER_OPERATIONAL</a> = 1, 
<a class="el" href="group__CO__NMT__Heartbeat.html#ggac396242e2e12ef6b0b22ff48636bc4eba8a2911a2a576a1bd83b7f4a247cd77c9">CO_NMT_ENTER_STOPPED</a> = 2, 
<a class="el" href="group__CO__NMT__Heartbeat.html#ggac396242e2e12ef6b0b22ff48636bc4eba575ed4f3386e8a63498921e659aa7ba4">CO_NMT_ENTER_PRE_OPERATIONAL</a> = 128, 
<a class="el" href="group__CO__NMT__Heartbeat.html#ggac396242e2e12ef6b0b22ff48636bc4ebaa8558d18a80148a598e6295ef41cdf97">CO_NMT_RESET_NODE</a> = 129, 
<br />
&#160;&#160;<a class="el" href="group__CO__NMT__Heartbeat.html#ggac396242e2e12ef6b0b22ff48636bc4ebabc6aef9d84c816eecaea38f9fe2cbd9c">CO_NMT_RESET_COMMUNICATION</a> = 130
<br />
 }</td></tr>
<tr class="memdesc:gac396242e2e12ef6b0b22ff48636bc4eb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Commands from NMT master.  <a href="group__CO__NMT__Heartbeat.html#gac396242e2e12ef6b0b22ff48636bc4eb">More...</a><br /></td></tr>
<tr class="separator:gac396242e2e12ef6b0b22ff48636bc4eb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf42f056a571b8e17a2d74428d1a49674"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__NMT__Heartbeat.html#gaf42f056a571b8e17a2d74428d1a49674">CO_NMT_reset_cmd_t</a> { <a class="el" href="group__CO__NMT__Heartbeat.html#ggaf42f056a571b8e17a2d74428d1a49674a1e75deb437b2e06b2c1f353bf76d8807">CO_RESET_NOT</a> = 0, 
<a class="el" href="group__CO__NMT__Heartbeat.html#ggaf42f056a571b8e17a2d74428d1a49674a2a48dc2be7c9ffa7874eb08a1ba39f6f">CO_RESET_COMM</a> = 1, 
<a class="el" href="group__CO__NMT__Heartbeat.html#ggaf42f056a571b8e17a2d74428d1a49674a2ab187bf1daccd4bc31685c08ca93bf1">CO_RESET_APP</a> = 2, 
<a class="el" href="group__CO__NMT__Heartbeat.html#ggaf42f056a571b8e17a2d74428d1a49674ae2c7805e42ce9b7c893018922b24a102">CO_RESET_QUIT</a> = 3
 }</td></tr>
<tr class="memdesc:gaf42f056a571b8e17a2d74428d1a49674"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return code for <a class="el" href="group__CO__NMT__Heartbeat.html#ga1fe239fe8212f8fe671bf9a355020531" title="Process received NMT and produce Heartbeat messages.">CO_NMT_process()</a> that tells application code what to reset.  <a href="group__CO__NMT__Heartbeat.html#gaf42f056a571b8e17a2d74428d1a49674">More...</a><br /></td></tr>
<tr class="separator:gaf42f056a571b8e17a2d74428d1a49674"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga3d1e633487f14741ce32c80ed8be1312"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__NMT__Heartbeat.html#ga3d1e633487f14741ce32c80ed8be1312">CO_NMT_init</a> (<a class="el" href="structCO__NMT__t.html">CO_NMT_t</a> *NMT, <a class="el" href="structCO__EM__t.html">CO_EM_t</a> *em, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nodeId, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> firstHBTime_ms, <a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *NMT_CANdevRx, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> NMT_rxIdx, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> CANidRxNMT, <a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *NMT_CANdevTx, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> NMT_txIdx, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> CANidTxNMT, <a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *HB_CANdevTx, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> HB_txIdx, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> CANidTxHB)</td></tr>
<tr class="memdesc:ga3d1e633487f14741ce32c80ed8be1312"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize NMT and Heartbeat producer object.  <a href="group__CO__NMT__Heartbeat.html#ga3d1e633487f14741ce32c80ed8be1312">More...</a><br /></td></tr>
<tr class="separator:ga3d1e633487f14741ce32c80ed8be1312"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga58b6123938e950b5e8c38ec0b9caeec4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__NMT__Heartbeat.html#ga58b6123938e950b5e8c38ec0b9caeec4">CO_NMT_initCallbackPre</a> (<a class="el" href="structCO__NMT__t.html">CO_NMT_t</a> *NMT, void *object, void(*pFunctSignal)(void *object))</td></tr>
<tr class="memdesc:ga58b6123938e950b5e8c38ec0b9caeec4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize NMT callback function after message preprocessed.  <a href="group__CO__NMT__Heartbeat.html#ga58b6123938e950b5e8c38ec0b9caeec4">More...</a><br /></td></tr>
<tr class="separator:ga58b6123938e950b5e8c38ec0b9caeec4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga87d153e39b32586b67ee6dd47dfce787"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__NMT__Heartbeat.html#ga87d153e39b32586b67ee6dd47dfce787">CO_NMT_initCallbackChanged</a> (<a class="el" href="structCO__NMT__t.html">CO_NMT_t</a> *NMT, void(*pFunctNMT)(<a class="el" href="group__CO__NMT__Heartbeat.html#ga1e8c2a6c0fd4a33183503d25a7c6d744">CO_NMT_internalState_t</a> state))</td></tr>
<tr class="memdesc:ga87d153e39b32586b67ee6dd47dfce787"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize NMT callback function.  <a href="group__CO__NMT__Heartbeat.html#ga87d153e39b32586b67ee6dd47dfce787">More...</a><br /></td></tr>
<tr class="separator:ga87d153e39b32586b67ee6dd47dfce787"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1fe239fe8212f8fe671bf9a355020531"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__CO__NMT__Heartbeat.html#gaf42f056a571b8e17a2d74428d1a49674">CO_NMT_reset_cmd_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__NMT__Heartbeat.html#ga1fe239fe8212f8fe671bf9a355020531">CO_NMT_process</a> (<a class="el" href="structCO__NMT__t.html">CO_NMT_t</a> *NMT, <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> timeDifference_us, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> HBtime_ms, <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> NMTstartup, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> errorRegister, const <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> errorBehavior[], <a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> *timerNext_us)</td></tr>
<tr class="memdesc:ga1fe239fe8212f8fe671bf9a355020531"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process received NMT and produce Heartbeat messages.  <a href="group__CO__NMT__Heartbeat.html#ga1fe239fe8212f8fe671bf9a355020531">More...</a><br /></td></tr>
<tr class="separator:ga1fe239fe8212f8fe671bf9a355020531"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2e3f0d579e321d73b53bf469d49b0ce3"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__CO__NMT__Heartbeat.html#ga1e8c2a6c0fd4a33183503d25a7c6d744">CO_NMT_internalState_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__NMT__Heartbeat.html#ga2e3f0d579e321d73b53bf469d49b0ce3">CO_NMT_getInternalState</a> (<a class="el" href="structCO__NMT__t.html">CO_NMT_t</a> *NMT)</td></tr>
<tr class="memdesc:ga2e3f0d579e321d73b53bf469d49b0ce3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Query current NMT state.  <a href="group__CO__NMT__Heartbeat.html#ga2e3f0d579e321d73b53bf469d49b0ce3">More...</a><br /></td></tr>
<tr class="separator:ga2e3f0d579e321d73b53bf469d49b0ce3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9d557708be1bfb9b169718abea90b663"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__NMT__Heartbeat.html#ga9d557708be1bfb9b169718abea90b663">CO_NMT_sendCommand</a> (<a class="el" href="structCO__NMT__t.html">CO_NMT_t</a> *NMT, <a class="el" href="group__CO__NMT__Heartbeat.html#gac396242e2e12ef6b0b22ff48636bc4eb">CO_NMT_command_t</a> command, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nodeID)</td></tr>
<tr class="memdesc:ga9d557708be1bfb9b169718abea90b663"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send NMT master command.  <a href="group__CO__NMT__Heartbeat.html#ga9d557708be1bfb9b169718abea90b663">More...</a><br /></td></tr>
<tr class="separator:ga9d557708be1bfb9b169718abea90b663"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>CANopen Network management and Heartbeat producer protocol.</p>
<p>CANopen device can be in one of the <a class="el" href="group__CO__NMT__Heartbeat.html#ga1e8c2a6c0fd4a33183503d25a7c6d744" title="Internal network state of the CANopen node.">CO_NMT_internalState_t</a></p><ul>
<li>Initializing. It is active before CANopen is initialized.</li>
<li>Pre-operational. All CANopen objects are active, except PDOs.</li>
<li>Operational. Process data objects (PDOs) are active too.</li>
<li>Stopped. Only Heartbeat producer and NMT consumer are active.</li>
</ul>
<p>NMT master can change the internal state of the devices by sending <a class="el" href="group__CO__NMT__Heartbeat.html#gac396242e2e12ef6b0b22ff48636bc4eb" title="Commands from NMT master.">CO_NMT_command_t</a>.</p>
<h3>NMT message contents:</h3>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">Byte </th><th class="markdownTableHeadNone">Description  </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">0 </td><td class="markdownTableBodyNone"><a class="el" href="group__CO__NMT__Heartbeat.html#gac396242e2e12ef6b0b22ff48636bc4eb" title="Commands from NMT master.">CO_NMT_command_t</a>  </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">1 </td><td class="markdownTableBodyNone">Node ID. If zero, command addresses all nodes.  </td></tr>
</table>
<h3>Heartbeat message contents:</h3>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">Byte </th><th class="markdownTableHeadNone">Description  </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">0 </td><td class="markdownTableBodyNone"><a class="el" href="group__CO__NMT__Heartbeat.html#ga1e8c2a6c0fd4a33183503d25a7c6d744" title="Internal network state of the CANopen node.">CO_NMT_internalState_t</a>  </td></tr>
</table>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__CO__driver.html#ga01dd35ae53fd2209ceccabdc8bf8dd06" title="Default CANopen identifiers.">CO_Default_CAN_ID_t</a> </dd></dl>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="ga1e8c2a6c0fd4a33183503d25a7c6d744"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1e8c2a6c0fd4a33183503d25a7c6d744">&#9670;&nbsp;</a></span>CO_NMT_internalState_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__CO__NMT__Heartbeat.html#ga1e8c2a6c0fd4a33183503d25a7c6d744">CO_NMT_internalState_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Internal network state of the CANopen node. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga1e8c2a6c0fd4a33183503d25a7c6d744a52d111d4262b514df4433ae07969cc3c"></a>CO_NMT_UNKNOWN&#160;</td><td class="fielddoc"><p>Device state is unknown (for heartbeat consumer) </p>
</td></tr>
<tr><td class="fieldname"><a id="gga1e8c2a6c0fd4a33183503d25a7c6d744a672c48c0e9bd5cb070bd86e1dcdc085c"></a>CO_NMT_INITIALIZING&#160;</td><td class="fielddoc"><p>Device is initializing. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga1e8c2a6c0fd4a33183503d25a7c6d744ae41d4ebcb7e26e165c8685b5809871a9"></a>CO_NMT_PRE_OPERATIONAL&#160;</td><td class="fielddoc"><p>Device is in pre-operational state. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga1e8c2a6c0fd4a33183503d25a7c6d744a3f9d07a10f2781201b85e9de9ba1c9a5"></a>CO_NMT_OPERATIONAL&#160;</td><td class="fielddoc"><p>Device is in operational state. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga1e8c2a6c0fd4a33183503d25a7c6d744aba34c0b4b2c6a0c11b01236cbe949ed5"></a>CO_NMT_STOPPED&#160;</td><td class="fielddoc"><p>Device is stopped. </p>
</td></tr>
</table>

</div>
</div>
<a id="gac396242e2e12ef6b0b22ff48636bc4eb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac396242e2e12ef6b0b22ff48636bc4eb">&#9670;&nbsp;</a></span>CO_NMT_command_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__CO__NMT__Heartbeat.html#gac396242e2e12ef6b0b22ff48636bc4eb">CO_NMT_command_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Commands from NMT master. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ggac396242e2e12ef6b0b22ff48636bc4eba6c7cdae79e5939cf321cdf82aa6b4146"></a>CO_NMT_ENTER_OPERATIONAL&#160;</td><td class="fielddoc"><p>Start device. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggac396242e2e12ef6b0b22ff48636bc4eba8a2911a2a576a1bd83b7f4a247cd77c9"></a>CO_NMT_ENTER_STOPPED&#160;</td><td class="fielddoc"><p>Stop device. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggac396242e2e12ef6b0b22ff48636bc4eba575ed4f3386e8a63498921e659aa7ba4"></a>CO_NMT_ENTER_PRE_OPERATIONAL&#160;</td><td class="fielddoc"><p>Put device into pre-operational. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggac396242e2e12ef6b0b22ff48636bc4ebaa8558d18a80148a598e6295ef41cdf97"></a>CO_NMT_RESET_NODE&#160;</td><td class="fielddoc"><p>Reset device. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggac396242e2e12ef6b0b22ff48636bc4ebabc6aef9d84c816eecaea38f9fe2cbd9c"></a>CO_NMT_RESET_COMMUNICATION&#160;</td><td class="fielddoc"><p>Reset CANopen communication on device. </p>
</td></tr>
</table>

</div>
</div>
<a id="gaf42f056a571b8e17a2d74428d1a49674"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf42f056a571b8e17a2d74428d1a49674">&#9670;&nbsp;</a></span>CO_NMT_reset_cmd_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__CO__NMT__Heartbeat.html#gaf42f056a571b8e17a2d74428d1a49674">CO_NMT_reset_cmd_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return code for <a class="el" href="group__CO__NMT__Heartbeat.html#ga1fe239fe8212f8fe671bf9a355020531" title="Process received NMT and produce Heartbeat messages.">CO_NMT_process()</a> that tells application code what to reset. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ggaf42f056a571b8e17a2d74428d1a49674a1e75deb437b2e06b2c1f353bf76d8807"></a>CO_RESET_NOT&#160;</td><td class="fielddoc"><p>Normal return, no action. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggaf42f056a571b8e17a2d74428d1a49674a2a48dc2be7c9ffa7874eb08a1ba39f6f"></a>CO_RESET_COMM&#160;</td><td class="fielddoc"><p>Application must provide communication reset. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggaf42f056a571b8e17a2d74428d1a49674a2ab187bf1daccd4bc31685c08ca93bf1"></a>CO_RESET_APP&#160;</td><td class="fielddoc"><p>Application must provide complete device reset. </p>
</td></tr>
<tr><td class="fieldname"><a id="ggaf42f056a571b8e17a2d74428d1a49674ae2c7805e42ce9b7c893018922b24a102"></a>CO_RESET_QUIT&#160;</td><td class="fielddoc"><p>Application must quit, no reset of microcontroller (command is not requested by the stack.) </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga3d1e633487f14741ce32c80ed8be1312"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3d1e633487f14741ce32c80ed8be1312">&#9670;&nbsp;</a></span>CO_NMT_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a> CO_NMT_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__NMT__t.html">CO_NMT_t</a> *&#160;</td>
          <td class="paramname"><em>NMT</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structCO__EM__t.html">CO_EM_t</a> *&#160;</td>
          <td class="paramname"><em>em</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nodeId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>firstHBTime_ms</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *&#160;</td>
          <td class="paramname"><em>NMT_CANdevRx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>NMT_rxIdx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>CANidRxNMT</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *&#160;</td>
          <td class="paramname"><em>NMT_CANdevTx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>NMT_txIdx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>CANidTxNMT</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *&#160;</td>
          <td class="paramname"><em>HB_CANdevTx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>HB_txIdx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>CANidTxHB</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize NMT and Heartbeat producer object. </p>
<p>Function must be called in the communication reset section.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">NMT</td><td>This object will be initialized. </td></tr>
    <tr><td class="paramname">em</td><td>Emergency object. </td></tr>
    <tr><td class="paramname">nodeId</td><td>CANopen Node ID of this device. </td></tr>
    <tr><td class="paramname">firstHBTime_ms</td><td>Time between bootup and first heartbeat message in milliseconds. If firstHBTime is greater than <em>Producer Heartbeat time</em> (object dictionary, index 0x1017), latter is used instead. </td></tr>
    <tr><td class="paramname">NMT_CANdevRx</td><td>CAN device for NMT reception. </td></tr>
    <tr><td class="paramname">NMT_rxIdx</td><td>Index of receive buffer in above CAN device. </td></tr>
    <tr><td class="paramname">CANidRxNMT</td><td>CAN identifier for NMT receive message. </td></tr>
    <tr><td class="paramname">NMT_CANdevTx</td><td>CAN device for NMT master transmission. </td></tr>
    <tr><td class="paramname">NMT_txIdx</td><td>Index of transmit buffer in above CAN device. </td></tr>
    <tr><td class="paramname">CANidTxNMT</td><td>CAN identifier for NMT transmit message. </td></tr>
    <tr><td class="paramname">HB_CANdevTx</td><td>CAN device for HB transmission. </td></tr>
    <tr><td class="paramname">HB_txIdx</td><td>Index of transmit buffer in the above CAN device. </td></tr>
    <tr><td class="paramname">CANidTxHB</td><td>CAN identifier for HB message.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532" title="Return values of some CANopen functions.">CO_ReturnError_t</a> CO_ERROR_NO or CO_ERROR_ILLEGAL_ARGUMENT. </dd></dl>

</div>
</div>
<a id="ga58b6123938e950b5e8c38ec0b9caeec4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga58b6123938e950b5e8c38ec0b9caeec4">&#9670;&nbsp;</a></span>CO_NMT_initCallbackPre()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_NMT_initCallbackPre </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__NMT__t.html">CO_NMT_t</a> *&#160;</td>
          <td class="paramname"><em>NMT</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>object</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void(*)(void *object)&#160;</td>
          <td class="paramname"><em>pFunctSignal</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize NMT callback function after message preprocessed. </p>
<p>Function initializes optional callback function, which should immediately start processing of <a class="el" href="group__CO__NMT__Heartbeat.html#ga1fe239fe8212f8fe671bf9a355020531" title="Process received NMT and produce Heartbeat messages.">CO_NMT_process()</a> function. Callback is called after NMT message is received from the CAN bus.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">NMT</td><td>This object. </td></tr>
    <tr><td class="paramname">object</td><td>Pointer to object, which will be passed to pFunctSignal(). Can be NULL </td></tr>
    <tr><td class="paramname">pFunctSignal</td><td>Pointer to the callback function. Not called if NULL. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga87d153e39b32586b67ee6dd47dfce787"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga87d153e39b32586b67ee6dd47dfce787">&#9670;&nbsp;</a></span>CO_NMT_initCallbackChanged()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_NMT_initCallbackChanged </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__NMT__t.html">CO_NMT_t</a> *&#160;</td>
          <td class="paramname"><em>NMT</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void(*)(<a class="el" href="group__CO__NMT__Heartbeat.html#ga1e8c2a6c0fd4a33183503d25a7c6d744">CO_NMT_internalState_t</a> state)&#160;</td>
          <td class="paramname"><em>pFunctNMT</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize NMT callback function. </p>
<p>Function initializes optional callback function, which is called after NMT State change has occured. Function may wake up external task which handles NMT events. The first call is made immediately to give the consumer the current NMT state.</p>
<dl class="section remark"><dt>Remarks</dt><dd>Be aware that the callback function is run inside the CAN receive function context. Depending on the driver, this might be inside an interrupt!</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">NMT</td><td>This object. </td></tr>
    <tr><td class="paramname">pFunctNMT</td><td>Pointer to the callback function. Not called if NULL. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga1fe239fe8212f8fe671bf9a355020531"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1fe239fe8212f8fe671bf9a355020531">&#9670;&nbsp;</a></span>CO_NMT_process()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CO__NMT__Heartbeat.html#gaf42f056a571b8e17a2d74428d1a49674">CO_NMT_reset_cmd_t</a> CO_NMT_process </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__NMT__t.html">CO_NMT_t</a> *&#160;</td>
          <td class="paramname"><em>NMT</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a>&#160;</td>
          <td class="paramname"><em>timeDifference_us</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>HBtime_ms</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a>&#160;</td>
          <td class="paramname"><em>NMTstartup</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>errorRegister</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>errorBehavior</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga33594304e786b158f3fb30289278f5af">uint32_t</a> *&#160;</td>
          <td class="paramname"><em>timerNext_us</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Process received NMT and produce Heartbeat messages. </p>
<p>Function must be called cyclically.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">NMT</td><td>This object. </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">timeDifference_us</td><td>Time difference from previous function call in [microseconds]. </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">HBtime_ms</td><td><em>Producer Heartbeat time</em> (object dictionary, index 0x1017). </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">NMTstartup</td><td><em>NMT startup behavior</em> (object dictionary, index 0x1F80). </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">errorRegister</td><td><em>Error register</em> (object dictionary, index 0x1001). </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">errorBehavior</td><td>pointer to <em>Error behavior</em> array (object dictionary, index 0x1029). Object controls, if device should leave NMT operational state. Length of array must be 6. If pointer is NULL, no calculation is made. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">timerNext_us</td><td>info to OS - see <a class="el" href="group__CO__CANopen.html#ga7a36da54b801074032622708e06a742e" title="Process CANopen objects.">CO_process()</a>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__CO__NMT__Heartbeat.html#gaf42f056a571b8e17a2d74428d1a49674" title="Return code for CO_NMT_process() that tells application code what to reset.">CO_NMT_reset_cmd_t</a> </dd></dl>

</div>
</div>
<a id="ga2e3f0d579e321d73b53bf469d49b0ce3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2e3f0d579e321d73b53bf469d49b0ce3">&#9670;&nbsp;</a></span>CO_NMT_getInternalState()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="group__CO__NMT__Heartbeat.html#ga1e8c2a6c0fd4a33183503d25a7c6d744">CO_NMT_internalState_t</a> CO_NMT_getInternalState </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__NMT__t.html">CO_NMT_t</a> *&#160;</td>
          <td class="paramname"><em>NMT</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Query current NMT state. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">NMT</td><td>This object.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__CO__NMT__Heartbeat.html#ga1e8c2a6c0fd4a33183503d25a7c6d744" title="Internal network state of the CANopen node.">CO_NMT_internalState_t</a> </dd></dl>

</div>
</div>
<a id="ga9d557708be1bfb9b169718abea90b663"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9d557708be1bfb9b169718abea90b663">&#9670;&nbsp;</a></span>CO_NMT_sendCommand()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a> CO_NMT_sendCommand </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__NMT__t.html">CO_NMT_t</a> *&#160;</td>
          <td class="paramname"><em>NMT</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__NMT__Heartbeat.html#gac396242e2e12ef6b0b22ff48636bc4eb">CO_NMT_command_t</a>&#160;</td>
          <td class="paramname"><em>command</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
          <td class="paramname"><em>nodeID</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Send NMT master command. </p>
<p>This functionality can only be used from NMT master. There is one exception where application from slave node may send NMT master command: If CANopen object 0x1F80 has value of <b>0x2</b>, then NMT slave shall execute the NMT service start remote node (CO_NMT_ENTER_OPERATIONAL) with nodeID set to 0.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">NMT</td><td>This object. </td></tr>
    <tr><td class="paramname">command</td><td>NMT command from CO_NMT_command_t. </td></tr>
    <tr><td class="paramname">nodeID</td><td>Node ID of the remote node. 0 for all nodes including self.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0: Operation completed successfully. </dd>
<dd>
other: same as <a class="el" href="group__CO__driver.html#ga4664a9f5d547cb0605a9e929fb079f2e" title="Send CAN message.">CO_CANsend()</a>. </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Sat Sep 19 2020 10:03:20 for CANopenNode by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
